package cc.yugu.yhdw.common.domain.basic;

import cc.yugu.yhdw.common.domain.StringIdEntity;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 支付订单基类（抽象类）（新增代理商id）
 * 
 * @Date:Created in 2018/7/25 10:24
 * @Author:
 * @Modified By: zjn 2018/7/25 10:24
 */ 
public abstract class PayOrder extends StringIdEntity {

    public enum SourceType {
        EXCHANGE_ORDER_CUSTOMER_PAY(1, "换电订单支付"),
        EXCHANGE_ORDER_CUSTOMER_BESPEAK(2, "换电预约支付"),
        DEPOSIT_ORDER_CUSTOMER_PAY(3, "充值支付费用"),
        CHARGER_ORDER_CUSTOMER_PAY(4, "充电支付费用"),
        ITEM_ORDER_CUSTOMER_PAY(5, "商品订单支付"),
        EXCHANGE_ORDER_SCAN_PAY(6, "换电订单扫码支付"),
        DEPOSIT_ORDER_SCAN_PAY(7, "充值订单扫码支付"),
        EXCHANGE_PACKET_ORDER_PAY(8,"客户购买换电套餐支付费用"),
        FOREGIFT_ORDER_CUSTOMER_PAY(9, "客户押金支付费用"),
        FOREGIFT_ORDER_CUSTOMER_SCAN_PAY(10, "客户押金扫码支付费用"),

        ;

        private final int value;
        private final String name;

        private SourceType(int value, String name) {
            this.value = value;
            this.name = name;
        }

        private static Map<Integer, String> map = new HashMap<Integer, String>();
        static {
            for (Status e : Status.values()) {
                map.put(e.getValue(), e.getName());
            }
        }

        public static String getName(int value) {
            return map.get(value);
        }

        public int getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }

    public enum Status {
        INIT(1, "初始"), SUCCESS(2, "成功");

        private final int value;
        private final String name;

        private Status(int value, String name) {
            this.value = value;
            this.name = name;
        }

        private static Map<Integer, String> map = new HashMap<Integer, String>();
        static {
            for (Status e : Status.values()) {
                map.put(e.getValue(), e.getName());
            }
        }

        public static String getName(int value) {
            return map.get(value);
        }

        public int getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }

    Integer agentId;
    Integer agencyId; // add field 代理商id --zxj
    Integer customerId;
    Integer money; //费用
    Integer sourceType; //关联的订单类型
    String sourceId; //关联的订单ID
    Integer orderStatus; // 订单状态
    Date handleTime;    // 操作时间
    Date createTime;  // 创建时间

    public Integer getAgentId() {
        return agentId;
    }

    public void setAgentId(Integer agentId) {
        this.agentId = agentId;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public Integer getSourceType() {
        return sourceType;
    }

    public void setSourceType(Integer sourceType) {
        this.sourceType = sourceType;
    }

    public String getSourceId() {
        return sourceId;
    }

    public void setSourceId(String sourceId) {
        this.sourceId = sourceId;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Date getHandleTime() {
        return handleTime;
    }

    public void setHandleTime(Date handleTime) {
        this.handleTime = handleTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getAgencyId() {
        return agencyId;
    }

    public void setAgencyId(Integer agencyId) {
        this.agencyId = agencyId;
    }
}
